<?php

use Biz\service\package\PackageOrder;

class AnalysisAssistantCreateOrderAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_REGISTER;
    const PAY_WAY = '0_BUY';

    public function main()
    {
        $uid = $this->uid;
        $orderNo = PackageOrder::createOrderNo(PackageOrder::PACKAGE_ID_3, $this->uid);
        $res = PackageOrder::createOrder($uid, $orderNo, self::PAY_WAY);
        if (!$res) {
            $this->setSuccess([], self::API_CODE_ERROR, '下单失败');
        } else {
            $this->setSuccess([], self::API_CODE_SUCCES);
        }

    }
}